package com.socialuni.jimei.controller.social;

import com.socialuni.api.model.QO.talk.*;
import com.socialuni.api.model.RO.talk.SocialTalkRO;
import com.socialuni.api.model.ResultRO;
import com.socialuni.sdk.api.TalkAPI;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class SocialTalkController implements TalkAPI {
    @Resource
    TalkAPI talkApi;

    @Override
    public ResultRO<List<SocialTalkRO>> queryTalks() {
        return talkApi.queryTalks();
    }

    //查询官方置顶的talks
    //没有商户号的情况下，appGender也可以人工设置不为空
    @Override
    public ResultRO<List<SocialTalkRO>> queryTalks(SocialHomeTalkQueryQO queryVO) {
        return talkApi.queryTalks(queryVO);
    }

    @Override
    public ResultRO<SocialTalkRO> queryTalkDetail(TalkIdQO talkIdQO) {
        return talkApi.queryTalkDetail(talkIdQO);
    }

    @Override
    public ResultRO<List<SocialTalkRO>> queryUserTalks(SocialUserTalkQueryQO queryVO) {
        return talkApi.queryUserTalks(queryVO);
    }

    @Override
    public ResultRO<Void> addTalk(SocialTalkAddQO talkVO) {
        return talkApi.addTalk(talkVO);
    }

    @Override
    public ResultRO<Void> deleteTalk(SocialTalkDeleteQO talkVO) {
        return talkApi.deleteTalk(talkVO);
    }

}
